package dao;


/**
 * 
 * This abstract class is responsible for creating a new JDBC or JPA Factory. 
 *
 */

public abstract class AbstractDAOFactory {
	
	/**
	 * 
	 * @param enum DAOType
	 * @return JDBCFactory if DAOType is JDBC
	 * 		   JPAFactory  if DAOType is JPA 	
	 */
	public static AbstractDAOFactory createFactory(DAOType type) {
		/*if (type == DAOType.JDBC) {
			return new JDBCFactory();
		} else*/
			return new JPAFactory();
	}

	/**
	 * 
	 * @return new UserDAO instance
	 */
	public abstract IUserDAO getUserDAO();

	/**
	 * 
	 * @return new CandidateDAO instance
	 */
	public abstract ICandidateDAO getCandidateDAO();

	/**
	 * 
	 * @return new PositionDAO instance
	 */
	public abstract IPositionDAO getPositionDAO();

	/**
	 * 
	 * @return new CandidateCommentDAO instance
	 */
	public abstract ICandidateCommentDAO getCandidateCommentDAO();

	/**
	 * 
	 * @return new PositionCommentDAO instance
	 */
	public abstract IPositionCommentDAO getPositionCommentDAO();
	
}
